SET(CMAKE_POLICY_DEFAULT_CMP0079 NEW)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)  # 设定最低版本要求
PROJECT(ArcticWuSpark) # 设定工程名

# 设定可执行二进制文件的目录（最后生成的可执行文件放置的目录）
# SET(RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
# SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

# 设置编译目标类型是release版还是debug版本
SET(CMAKE_BUILD_TYPE "debug")

# 设置C++版本
SET(CMAKE_CXX_STANDARD 17)

# 设定头文件目录
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include/spark_inc)

# 增加子文件夹，进入源代码文件夹继续构建
ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/src)

ADD_LIBRARY(SparkChain ${PROJECT_SOURCE_DIR}/lib/x64/SparkChain.dll)  
TARGET_LINK_LIBRARIES(ArcticWuSpark SparkChain) 

#if(WIN32)   
# TARGET_LINK_LIBRARIES(ArcticWuSpark ${PROJECT_SOURCE_DIR}/lib/x64/SparkChain.dll)
#else() 
#LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib/ARM)  
#TARGET_LINK_LIBRARIES(ArcticWuSpark libSparkChain.so)  
#endif()
